Field of the Invention
This invention relates generally to the field of computer processors. More particularly, the invention relates to a method and apparatus for managing a virtual graphics processor unit (GPU).
Description of the Related Art
Graphics processor unit (GPU) virtualization has become increasingly important as cloud and data centers share graphics (GFX) hardware among multiple virtual machines (VMs), such as with VDI (Virtual Desktop Infrastructure) use cases. Technology directed at GFX virtualization includes GRID™ platforms developed by NVidia™ and virtual Graphics Technology (vGT)™ platforms developed by Intel™. Graphics virtualization has become important in mobile devices as well, such as implemented in the virtualization-based Dual-OS proj ect.
There are typically two methods to support efficient GFX virtualization, referred to as “pass-through” and “mediate pass-through.” Pass-through technologies are widely used with input/output memory management unit (IOMMU) technology such as Intel Virtualization Technology for Directed I/O (VT-d) and/or Single Root I/O Virtualization (SRIOV), where the hardware can generate multiple instances of PCI express (PCIe) functions so that each guest can directly access the runtime hardware resources (e.g., memory mapped IO (MMIO) and direct memory access (DMA)). For example, IOMMU technology will remap the guest physical DMA address to the host. However, SRIOV-capable GFX devices require extensive hardware modification and/or circuit budget and, as a result, examples of this technology have not appeared in any significant devices or platforms.
Mediate pass-through tweaks the solution a bit, by using the software to emulate the access of less performance-critical resources (e.g., MMIO registers) from the guest, but to pass-through performance-critical resource access, such as aperture and rendering commands. For example, guest aperture access may go directly to hardware, and the guest rendering commands may be directly executed by the GPU.